package com.lagou.task10;

public class IPlayTest {

    //1.声明接口类型的引用指向实现类的对象，形成了多态
    public static void main(String[] args) {
        IPlay p = new NewPhone();
        p.playGame();
        p.music();
        System.out.println("---------------------------------------------------------");
        IPlay s = new OldPhone();
        s.playGame();
        IPlay.study();
        p.music();
    }

}
